package org.geektimes.di;

import org.geektimes.context.ClassicComponentContext;

import javax.servlet.ServletContainerInitializer;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
import java.util.Set;

/**
 *  依赖注入上下文初始化,继承容器初始化类
 */
public class DependencyInjectContextInit implements ServletContainerInitializer {

    @Override
    public void onStartup(Set<Class<?>> c, ServletContext servletContext) throws ServletException {
        ClassicComponentContext context = new ClassicComponentContext();
        context.init(servletContext);
        System.out.println("**************依赖注入初始化上下文***********************");
    }
}
